{% extends "bussiness/dash_empresa.html" %}

{% load avatar_tags %}

{% block mystylesheet-dashboard %}
    <link rel="stylesheet" href="{{ STATIC_URL }}css/styleMati.css" type="text/css" />
{% endblock mystylesheet-dashboard%}

{% block dashboard %}
    <div class="title-messages">Consultas</div>
    <div class="list-content-user-messages">
        <ul>
            {% for consulta in consulta_item %}
                <li class="content-user-messages">
                    <div class="user-message-image">
                        <img src="{% avatar_url consulta.user_from 50 %}" alt="">
                    </div>
                    <div class="user-message-name">
                        {{ consulta.mensaje }}
                    </div>
                    <div class="user-message-last"></div>
                    <div class="clear"></div>
                </li>
            {% endfor %}
        </ul>
    </div>
    <div class="message-line-response">
        <div class="new-message">
            <p><strong>Responder:</strong></p>
            <form method="post" action="/social/responder_consulta_item/{{ item_id }}/{{ user_id }}">
                {% csrf_token %}
                <div class="message-content-response">
                    {{ consulta_form.respuesta.errors }}
                    {{ consulta_form.respuesta }}
                </div>
                <input type="submit" value="Enviar" class="btn btn-success"/>
            </form>
        </div>
    </div>
{% endblock dashboard %}
